package com.jiujichina.star.base;

import lombok.Data;
import org.elasticsearch.index.settings.IndexDynamicSettings;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

import java.io.Serializable;

/**
 * Created by Lenovo on 2018/7/7.
 */
@Data
@Document(indexName = "bank", type = "account", shards = 1, replicas = 0,
        refreshInterval = "-1")
public class Account implements Serializable {

    private static final long serialVersionUID = -763638353551774166L;

    public static final String INDEX_NAME = "bank";

    public static final String TYPE = "account";

    private String firstname;

    private String lastname;

    @Id
    private Long id;

    private String name;

    public Account() {
        super();
    }

    public Account(Long id, String name) {
        this.id = id;
        this.name = name;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String getFirstname() {
        return firstname;
    }

    public void setFirstname(String firstname) {
        this.firstname = firstname;
    }

    public String getLastname() {
        return lastname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }
}
